/* --- RESET & BASIC STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial";
}

/* Menggunakan rem basis 16px. Saat browser di-zoom, ukuran rem ikut membesar secara proporsional */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: #f9f6e5;
  color: #0e1e38; /* Warna Navy Gelap */
  overflow-x: hidden;
  width: 100%;
}

/* Container utama pengunci layout agar saat di-zoom posisi elemen di dalam tidak meluber keluar */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- NAVBAR --- */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 8%;
  z-index: 100;
}

.logo {
  font-family: "karethtrial";
  color: #f9f6e5;
  font-weight: normal;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

nav ul li a {
  font-family: "Flair Display";
  color: #f9f6e5;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
  color: #e6c687;
  opacity: 1;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 95vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("../Aset/Batik1.jpeg") no-repeat center center/cover;
  display: flex;
  align-items: flex-start; /* Mengubah posisi konten agar naik ke arah navbar */
  padding: 11rem 8% 0 8%; /* Memberikan jarak atas 11rem dari navbar agar tidak tabrakan */
}

.hero-content {
  max-width: 37.5rem;
  color: #f9f6e5;
  z-index: 2;
  /* Margin bottom dihapus/dikurangi agar teks tidak terdorong ke bawah */
  margin-bottom: 0;
}

.hero-content h1 {
  font-family: "karethtrial";
  color: #f9f6e5;
  font-size: 3.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem; /* Mempersempit jarak antara Judul utama dan Subjudul */
  line-height: 1.15;
}

.hero-content p {
  font-family: "Flair Display";
  color: #f9f6e5;
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.8rem; /* Jarak yang pas dari subjudul ke tombol */
  font-style: italic;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background-color: #e6c687;
  color: #12233c;
  text-decoration: none;
  border-radius: 1.25rem;
  font-family: "Flair Display";
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-square {
  border-radius: 0.25rem;
}

/* --- ANTI-SCROLL WAVE MANAGEMENT --- */
/* Mengunci posisi ombak dengan persentase lebar yang stabil saat di-zoom */
.wave-container {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
}

.wave-container svg {
  position: relative;
  display: block;
  width: 100%; /* Mengunci agar wave tidak melampaui batas layar lebar saat di-zoom */
  height: 7.5rem; /* Ukuran proporsional menggunakan rem */
}

.wave-top {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  z-index: 3;
}

.wave-top svg {
  display: block;
  width: 100%;
  height: 7.5rem;
}

/* --- FEATURES SECTION --- */
.features {
  padding: 5rem 0 8.75rem 0;
  background-color: #fdf5e6;
  width: 100%;
}

.features-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Mencegah bentrokan kartu saat di-zoom, kartu otomatis turun */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.feature-card {
  background-color: #e6c687;
  padding: 2rem 1.25rem;
  border-radius: 0.75rem;
  text-align: center;
  width: 15rem; /* Tetap konsisten berukuran rem */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.feature-card h3 {
  font-family: "Flair Display";
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.feature-card a {
  font-size: 0.75rem;
  color: #12233c;
  text-decoration: none;
  display: inline-block;
}

/* --- MID BANNER --- */
.mid-banner {
  position: relative;
  padding: 11rem 8%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../Aset/12.jpeg") no-repeat center center/cover;
  color: #fff;
}

.mid-content {
  max-width: 50rem;
  position: relative;
  z-index: 2;
}

.mid-content h2 {
  font-family: "karethtrial";
  font-weight: normal;
  color: #f9f6e5;
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

.mid-content p {
  font-size: 1.1rem;
  color: #f9f6e5;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* --- MOTIF POPULER --- */
.motif-section {
  padding: 0.5rem 0 5rem 0;
  text-align: center;
  background-color: #fdf5e6;
}

.section-title h2 {
  font-family: "karethtrial";
  font-weight: normal;
  font-size: 2.75rem;
  color: #1d3557;
  margin-bottom: 0.2rem; /* Menempelkan/merapatkan judul "Motif Populer" dengan teks di bawahnya */
}

.section-title p {
  font-family: "Flair Display";
  font-style: italic;
  color: #1d3557;
  font-size: 0.95rem;
  margin-bottom: 4.5rem; /* Memberikan ruang kosong yang luas sebelum masuk ke deretan kartu kain */
}
/* Menggunakan Auto-Fit Grid cerdas yang akan menyesuaikan space saat di-zoom */
.grid-motif {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.card-motif {
  background: #fff;
  border: 1px solid #1d3557;
  overflow: hidden;
  text-align: left;
  transition: box-shadow 0.3s ease;
}

.card-motif:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-motif img {
  width: 100%;
  height: 13.75rem;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card-body h4 {
  font-family: "Flair Display";
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: #12233c;
}

.card-body a {
  font-size: 0.85rem;
  color: #12233c;
  text-decoration: none;
  font-weight: bold;
}

/* --- FOOTER --- */
footer {
  position: relative;
  background-color: #0d1f3d;
  color: #fff;
  padding: 9rem 0 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2.5rem;
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-about h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: #e6c687;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: 0.3s ease;
}

.footer-col ul li a:hover {
  opacity: 1;
  color: #e6c687;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ==========================================================
   MEDIA QUERIES (RESPONSIVE & ZOOM-SAFETY BREAKPOINTS)
   ========================================================== */

@media (max-width: 992px) {
  header {
    padding: 1.5rem 8%;
    flex-direction: row;
    justify-content: space-between;
  }

  /* Mengunci Hero Beranda & Hero Tentang Batik di layar Tablet */
  .hero,
  .hero-home,
  .hero-about {
    padding: 11rem 8% 7rem 8%;
    align-items: flex-start !important;
    text-align: left !important;
  }

  /* Mengunci bungkus konten agar tidak lari ke tengah */
  .hero-content,
  .hero-home-content {
    margin: 0 !important;
  }

  .hero-content h1,
  .hero-home h1 {
    font-size: 2.2rem;
  }

  .flex-container {
    flex-direction: column;
    gap: 2.5rem;
  }

  .invert-mobile {
    flex-direction: column-reverse;
  }

  .text-wrapper {
    text-align: left;
  }

  .wave-container svg,
  .wave-top svg {
    height: 5rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 5%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
  }

  nav ul li a {
    font-size: 0.85rem;
  }

  /* Mengunci Hero Beranda & Hero Tentang Batik di layar Handphone */
  .hero,
  .hero-home,
  .hero-about {
    padding: 10rem 5% 5rem 5%;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .hero-content h1,
  .hero-home h1 {
    font-size: 1.8rem;
  }

  .wave-container svg,
  .wave-top svg {
    height: 3.5rem;
  }
}
